package user

import (
	"github.com/gin-gonic/gin"
	"go.uber.org/zap"
	"project/router"
)

func init() {
	zap.L().Info("init user router")
	d := &RouterUser{}
	router.Register(d)
}

type RouterUser struct{}

func (ro *RouterUser) Route(r *gin.Engine) {
	InitRpcUserClient() // 初始化grpc的客户端连接
	h := HandlerUser{}
	r.POST("/project/login/getCaptcha", h.getCaptcha)
	r.POST("/project/login/register", h.register)
	r.POST("/project/login", h.login)
}
